package edu.xlh.travel.util;

import java.util.Calendar;

public class CurrentWeekToNumber {
    static String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};

    public static String transformWeekToString() {
        Calendar calendar=Calendar.getInstance();
        System.out.println("今天是"+weekDays[calendar.get(Calendar.DAY_OF_WEEK)-1]);
        String str = weekDays[calendar.get(Calendar.DAY_OF_WEEK)-1];
        switch(str) {
            case "星期一" : str = "0";break;
            case "星期二" : str = "1";break;
            case "星期三" : str = "2";break;
            case "星期四" : str = "3";break;
            case "星期五" : str = "4";break;
            case "星期六" : str = "5";break;
            case "星期日" : str = "6";break;
            default : ; break;
        }
        return str;
    }
}
